A type system with usage aspects
نویسندگان
چکیده
Linear typing schemes can be used to guarantee non-interference and so the soundness of in-place update with respect to a functional semantics. But linear schemes are restrictive in practice, and more restrictive than necessary to guarantee soundness of in-place update. This limitation has prompted research into static analysis and more sophisticated typing disciplines to determine when in-place update may be safely used, or to combine linear and non-linear schemes. Here we contribute to this direction by defining a new typing scheme that better approximates the semantic property of soundness of in-place update for a functional semantics. We begin from the observation that some data is used only in a “read-only” context, after which it may be safely re-used before being destroyed. Formalising the in-place update interpretation in a machine model semantics allows us to refine this observation, motivating three usage aspects apparent from the semantics that are used to annotate function argument types. The aspects are (1) used destructively, (2) used read-only but shared with result, and (3) used read-only and not shared with the result. The main novelty is aspect (2) that allows a linear value to be safely read and even aliased with a result of a function without being consumed. This novelty makes our type system more expressive than previous systems for functional languages in the literature. The system remains simple and intuitive, but it enjoys a strong soundness property whose proof is non-trivial. Moreover, our analysis features principal types and feasible type reconstruction, as shown in (Konecny, 2003b).
منابع مشابه
Earthen architecture, an alternative to construction industry to manage the drought crisis in Iran: Comparison between water usage in a building with three type of loading system: steel, concrete, and earth
Abstract: Iran faces water shortage crisis whilst construction industry consumes huge amount of water. There are not precise data about construction industry water consumption. Accordingly, lack of comparison as well as prioritization between prevalent structural systems and alternatives which probably use less water create problems in planning for less consumption. There are two questions whi...
متن کاملThe Examination of Yazd Young's Attitude toward National Identity and its Effective Factors
National identity is the most pervasive level of identity among all social systems. In compare with other type of common identity, the national identity will affect on different aspects of life in every social system. So, this study attempts to examine Yazd young's attitude toward national identity and its effective factors. The sample size of this survey consists of 378 young (18-30 ages) whic...
متن کاملLFPL with Types for Deep Sharing
First-order LFPL is a functional language for non-size increasing computation with an operational semantics that allows in-place update. The semantics is correct for all welltyped programs thanks to linear restrictions on the typing. Nevertheless, the linear typing is very strict and rejects many correct, natural in-place update algorithms. Aspinall andHofmann added usage aspects to variables i...
متن کاملTyping with Conditions and Guarantees for Functional In-place Update
Hofmann’s LFPL is a functional language with constructs that can be interpreted as referring to heap locations. In this view, the language is suitable for expressing and verifying in-place update algorithms. Correctness of in-place evaluation is guaranteed by a linear typing. As linearity prevents sharing on the heap, LFPL rejects many sound, natural in-place update algorithms with sharing. Rec...
متن کاملحقوق مالکیت ادبی و هنری در ویدیوهای درخواستی (VOD): با نگاهی به حقوق ایران
VOD is a service that is going to be applied in Iran, which makes it possible for the users to watch multimedia from the Archives at the times they desire, without being able of saving them It should be bearded in mind that having this system applied perfectly needs not only the technical tools but also updated legal rules that will manage the usage. Due to the extent of concerned legal issues ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- J. Funct. Program.
دوره 18 شماره
صفحات -
تاریخ انتشار 2008